package com.chixing.day13_list.work;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

public class FlowTest {
    public static void main(String[] args) {
        Map<String,Flow> map = new HashMap<>();
        map.put("刘德华",new Flow(000001,"刘德华",0000,'M',4155990188888888L, 300.00));
        map.put("小丽",new Flow(000201,"小丽",0002,'F',4155990199999999L, 500.00));
        map.put("黄晓明",new Flow(000101,"黄晓明",0012,'M',4155990100000000L, 1000.50));
        map.put("张东健",new Flow(000101,"张东健",0012,'M',4155990155555555L, 600.99));
        map.put("梁朝伟",new Flow(000301,"梁朝伟",0013,'M',4155990111111111L, 5000.00));
        map.put("刘德华",new Flow(000001,"刘德华",0000,'M',4155990188888888L, 200.00));

//        1. 统计出各用户的流水信息  （Map<客户姓名,流水对象>  即 Map<String,Flow> ）
        for (String i : map.keySet()){
            System.out.println("姓名："+i+"账号"+map.get(i));
        }
//        2. 根据用户姓名查询处他对应的流水信息
        System.out.println(map.get("小丽"));
//        3. 统计出所有客户的流水金额
        for (String i : map.keySet()){
            System.out.println("姓名："+i+",账号的流水金额:"+map.get(i).getFlowMoney());
        }
    }
}
